import { ActionTree, MutationTree } from 'vuex'
const state: Record<string, any> = {
  platform: ''
}
const mutations: MutationTree<any> = {
  setPlatform(state, platform) {
    state.platform = platform
  }
}
// actions: 如果不是异步的更新可以不使用actions ,直接用store.commit('setPlatform',platform)
const actions: ActionTree<any, any> = {
  // setPlatform({commit},platform) {
  //   commit('setPlatform', platform);
  // }
}

export default {
  state,
  mutations,
  actions
}
